package myschool.test3;

import myschool.dao.StudentDao;
import myschool.dao.SubjectDao;
import myschool.entity.Student;
import myschool.entity.Subject;
import myschool.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * @author oldliu
 * @since 1.0
 */
public class SubjectUpdate {
    public static void main(String[] args) throws ParseException {

        SqlSession s = MybatisUtil.get();
        SubjectDao mapper = s.getMapper(SubjectDao.class);
        Subject sub=new Subject();
        sub.setId(56L);
        sub.setSubjectname("科学养熊猫");
        int update = mapper.update(sub);
        System.out.println(update);
        MybatisUtil.close(s);


    }
}
